Gtk fix various treeview bugs #2643
Merged
+75
−25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix a couple of selection related bugs in the Grid
If you switched to Multi mode, unselected everything, and switched back to Single then you could no longer select anything. I reproduced this in raw GtkSharp but I can't find the cause so this is a workaround. I don't think this would break anything if the underlying issue were fixed.
If you switched to Multi and back to Single you could no longer unselect anything. This was due to AllowMultipleSelection starting in Single but setting Browse.
Fix inability to select bottom row of GridView
This was caused by the header height not being taken into consideration. I did the fixes for the above issues in such a way as to remove the need for the mouse click handler altogether. That handler didn't account for unselecting with the keyboard anyway.
These fixes also address (I believe):
#2335
#2401
#2443
and potentially some others but there are too many for me to check.
There are many inconsistencies between the platforms for what happens to the selection on switching modes or which events fire under which conditions. I've just tried to be sensible for what was already happening between Eto, Eto.Gtk, and GtkSharp and any other issues need to be addressed separately.